﻿namespace ufida.u9.ait.openapi
{
	using System;
	using System.Collections.Generic;
	using System.Text;
    using ufida.u9.ait.openapi.utils;
    using UFSoft.UBF.AopFrame;	
	using UFSoft.UBF.Util.Context;

	/// <summary>
	/// FAAlterDocSaveSV partial 
	/// </summary>	
	public partial class FAAlterDocSaveSV 
	{	
		internal BaseStrategy Select()
		{
			return new FAAlterDocSaveSVImpementStrategy();	
		}		
	}
	
	#region  implement strategy	
	/// <summary>
	/// Impement Implement
	/// 
	/// </summary>	
	internal partial class FAAlterDocSaveSVImpementStrategy : BaseStrategy
	{
		public FAAlterDocSaveSVImpementStrategy() { }

		public override object Do(object obj)
		{						
			FAAlterDocSaveSV bpObj = (FAAlterDocSaveSV)obj;

			return CodeUtils.DocSaveNT(bpObj, bpObj.Data, FAAlterBase.CreateDoc,
				(doc) =>
				{
					FAAlterBase.CommitDoc(doc);
					FAAlterBase.ApproveDoc(doc);
					return doc;
				},
                FAAlterBase.DeleteDoc);
		}
	}

	#endregion
	
	
}